﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    x:Class="WPadkDemo.MainPage"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="any_temp">
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="tbk_温度">
				<EasingColorKeyFrame KeyTime="0" Value="White"/>
				<EasingColorKeyFrame KeyTime="0:0:0.5" Value="Red"/>
				<EasingColorKeyFrame KeyTime="0:0:1" Value="White"/>
			</ColorAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="tbk_湿度">
				<EasingColorKeyFrame KeyTime="0" Value="White"/>
				<EasingColorKeyFrame KeyTime="0:0:0.5" Value="Red"/>
				<EasingColorKeyFrame KeyTime="0:0:1" Value="White"/>
			</ColorAnimationUsingKeyFrames>
		</Storyboard>
	</phone:PhoneApplicationPage.Resources>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="768"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->

        <!--ContentPanel - place additional content here-->
        <controls:Panorama Title="WP ADK">
        	<controls:PanoramaItem Header="连接WP ADK">
        		<Grid>
        			<ListBox x:Name="listBox1" Margin="8,0,8,81" Height="131" VerticalAlignment="Bottom"/>
        			<Button x:Name="bt1" Content="连接到WPADK" VerticalAlignment="Bottom" Margin="8,0,192,8" />
        			<TextBlock HorizontalAlignment="Left" Height="45" Margin="8,24,0,0" TextWrapping="Wrap" Text="硬件ID" VerticalAlignment="Top" Width="131" FontSize="32" TextAlignment="Right"/>
        			<TextBox x:Name="tb_dyid" Height="78" Margin="143,8,8,0" TextWrapping="Wrap" Text="wpadk" VerticalAlignment="Top"/>
        			<TextBlock HorizontalAlignment="Left" Height="45" Margin="8,106,0,0" TextWrapping="Wrap" Text="硬件密码" VerticalAlignment="Top" Width="131" FontSize="32"/>
        			<TextBox x:Name="tb_pwd" Height="78" Margin="143,90,8,0" TextWrapping="Wrap" Text="123456" VerticalAlignment="Top"/>
        			<TextBlock HorizontalAlignment="Left" Height="45" Margin="8,188,0,0" TextWrapping="Wrap" Text="硬件IP" VerticalAlignment="Top" Width="131" FontSize="32" TextAlignment="Right"/>
        			<TextBox x:Name="tb_ip" Margin="143,172,8,216" TextWrapping="Wrap" Text="192.168.1.254"/>
        			<Button x:Name="bt_重置" Content="重置硬件" VerticalAlignment="Bottom" Margin="0,0,8,8" HorizontalAlignment="Right" Width="184" />
        		</Grid>
        	</controls:PanoramaItem>
        	<controls:PanoramaItem Header="温度湿度">
        		<Grid>
        			<Button x:Name="bt2" Content="截取温湿度" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,8,8"/>
        			<TextBlock Height="63" Margin="33,44,0,0" TextWrapping="Wrap" Text="温度" VerticalAlignment="Top" FontSize="48" HorizontalAlignment="Left" Width="122"/>
        			<TextBlock HorizontalAlignment="Left" Height="66" Margin="33,107,0,0" TextWrapping="Wrap" Text="湿度" VerticalAlignment="Top" Width="122" FontSize="48"/>
        			<TextBlock x:Name="tbk_温度" Height="63" Margin="155,44,8,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="48"/>
        			<TextBlock x:Name="tbk_湿度" Height="62" Margin="155,111,8,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="48"/>
        		</Grid>
        	</controls:PanoramaItem>
        	<controls:PanoramaItem Header="数字输出">
        		<Grid>
        			<ScrollViewer Margin="0,66,10,-58">
        				<Grid Height="904">
        					<toolkit:ToggleSwitch x:Name="ts_io2" Header="D2IO" VerticalAlignment="Top" HorizontalAlignment="Left" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment" Width="204" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl2" Header="D2HL" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment, Width" Width="202" HorizontalAlignment="Right"/>
        					<toolkit:ToggleSwitch x:Name="ts_io3" Header="D3IO" HorizontalAlignment="Left" Margin="0,115,0,0" Width="202" Height="111" VerticalAlignment="Top" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl3" Header="D3HL" Margin="0,115,0,0" Width="202" HorizontalAlignment="Right" d:LayoutOverrides="Width" Height="111" VerticalAlignment="Top"/>
        					<toolkit:ToggleSwitch x:Name="ts_io4" Header="D4IO" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,226,0,0" Width="202" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl4" Header="D4HL" VerticalAlignment="Top" Margin="0,226,0,0" Width="202" HorizontalAlignment="Right" d:LayoutOverrides="Width"/>
        					<toolkit:ToggleSwitch x:Name="ts_io5" Header="D5IO" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,337,0,0" Width="202" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl5" Header="D5HL" VerticalAlignment="Top" Margin="0,337,0,0" Width="202" HorizontalAlignment="Right" d:LayoutOverrides="Width"/>
        					<toolkit:ToggleSwitch x:Name="ts_io6" Header="D6IO" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,452,0,0" Width="202" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl6" Header="D6HL" VerticalAlignment="Top" Margin="0,452,0,0" Width="202" HorizontalAlignment="Right" d:LayoutOverrides="Width"/>
        					<toolkit:ToggleSwitch x:Name="ts_io7" Header="D7IO" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,563,0,0" Width="202" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl7" Header="D7HL" VerticalAlignment="Top" Margin="0,563,0,0" Width="202" HorizontalAlignment="Right" d:LayoutOverrides="Width"/>
        					<toolkit:ToggleSwitch x:Name="ts_io8" Header="D8IO" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,678,0,0" Width="202" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl8" Header="D8HL" VerticalAlignment="Top" Margin="0,678,0,0" Width="202" HorizontalAlignment="Right" d:LayoutOverrides="Width"/>
        					<toolkit:ToggleSwitch x:Name="ts_io9" Header="D9IO" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,793,0,0" Width="202" Content="IN"/>
        					<toolkit:ToggleSwitch x:Name="ts_hl9" Header="D9HL" VerticalAlignment="Top" Margin="0,793,0,0" Width="202" HorizontalAlignment="Right" d:LayoutOverrides="Width"/>
        				</Grid>
        			</ScrollViewer>
        			<Button x:Name="bt_取数字端口" Content="截取数字端口数据" HorizontalAlignment="Left" VerticalAlignment="Top" Width="412"/>
        		</Grid>
        	</controls:PanoramaItem>
        	<controls:PanoramaItem Header="模似信号">
        		<Grid>
        			<Grid Margin="8,62,8,-55">
        				<ScrollViewer Margin="0,0,0,56">
        					<Grid>
        						<TextBlock Height="63" TextWrapping="Wrap" Text="A1：" VerticalAlignment="Top" FontSize="48" HorizontalAlignment="Left" Width="122"/>
        						<TextBlock HorizontalAlignment="Left" Height="66" Margin="0,67,0,0" TextWrapping="Wrap" Text="A2：" VerticalAlignment="Top" Width="122" FontSize="48"/>
        						<TextBlock x:Name="tbk_a1" Height="63" Margin="126,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="48"/>
        						<TextBlock x:Name="tbk_a2" Height="62" Margin="126,71,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="48"/>
        						<TextBlock HorizontalAlignment="Left" Height="66" Margin="0,133,0,0" TextWrapping="Wrap" Text="A3：" VerticalAlignment="Top" Width="122" FontSize="48"/>
        						<TextBlock x:Name="tbk_a3" Height="62" Margin="126,137,0,0" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="48"/>
        						<TextBlock HorizontalAlignment="Left" Margin="0,195,0,198" TextWrapping="Wrap" Text="A4：" Width="122" FontSize="48"/>
        						<TextBlock x:Name="tbk_a4" Margin="126,199,0,198" TextWrapping="Wrap" FontSize="48"/>
        						<TextBlock HorizontalAlignment="Left" Height="66" Margin="0,0,0,132" TextWrapping="Wrap" Text="A5：" VerticalAlignment="Bottom" Width="122" FontSize="48"/>
        						<TextBlock x:Name="tbk_a5" Height="62" Margin="126,0,0,132" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="48"/>
        						<TextBlock HorizontalAlignment="Left" Height="66" Margin="0,0,0,66" TextWrapping="Wrap" Text="A6：" VerticalAlignment="Bottom" Width="122" FontSize="48"/>
        						<TextBlock x:Name="tbk_a6" Height="62" Margin="126,0,0,66" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="48"/>
        						<TextBlock HorizontalAlignment="Left" Height="66" TextWrapping="Wrap" Text="A7：" VerticalAlignment="Bottom" Width="122" FontSize="48"/>
        						<TextBlock x:Name="tbk_a7" Height="62" Margin="126,0,0,0" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="48"/>
        					</Grid>
        				</ScrollViewer>
        			</Grid>
        			<Button x:Name="bt_取数字端口1" Content="截取数字端口数据" HorizontalAlignment="Left" VerticalAlignment="Top" Width="412"/>
        		</Grid>
        	</controls:PanoramaItem>
        	<controls:PanoramaItem Header="脉冲频宽">
        		<Grid>
        			<Slider x:Name="sd_p3" VerticalAlignment="Top" Margin="103,0,8,0" Maximum="255" SmallChange="1" Height="92" LargeChange="5"/>
        			<TextBlock HorizontalAlignment="Left" Height="92" Margin="8,0,0,0" TextWrapping="Wrap" Text="P3" VerticalAlignment="Top" Width="91" FontSize="48"/>
        			<Slider x:Name="sd_p5" VerticalAlignment="Top" Margin="103,92,8,0" Maximum="255" SmallChange="1" Height="92" LargeChange="5"/>
        			<TextBlock HorizontalAlignment="Left" Height="92" Margin="8,92,0,0" TextWrapping="Wrap" Text="P5" VerticalAlignment="Top" Width="91" FontSize="48"/>
        			<Slider x:Name="sd_p6" Margin="103,184,8,190" Maximum="255" SmallChange="1" LargeChange="5"/>
        			<TextBlock HorizontalAlignment="Left" Margin="8,184,0,190" TextWrapping="Wrap" Text="P6" Width="91" FontSize="48"/>
        			<Slider x:Name="sd_p9" VerticalAlignment="Bottom" Margin="103,0,8,94" Maximum="255" SmallChange="1" Height="92" LargeChange="5"/>
        			<TextBlock HorizontalAlignment="Left" Height="92" Margin="8,0,0,94" TextWrapping="Wrap" Text="P9" VerticalAlignment="Bottom" Width="91" FontSize="48"/>
        		</Grid>
        	</controls:PanoramaItem>
        	<controls:PanoramaItem Header="红外线收发">
        		<Grid>
        			<Button x:Name="bt_IrLrean" Content="开始学习功能" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,8,0,0"/>
        			<TextBox x:Name="tb_IrData" TextWrapping="Wrap" Margin="0,121,0,71" d:LayoutOverrides="Width"/>
        			<Button x:Name="bt_IrSend" Content="模似发射" VerticalAlignment="Bottom" Margin="-3,0,15,2"/>
        			<TextBox x:Name="tb_IrLreanPin" Height="71" Margin="54,6,206,0" TextWrapping="Wrap" Text="2" VerticalAlignment="Top"/>
        			<TextBlock HorizontalAlignment="Left" Height="47" Margin="8,27,0,0" TextWrapping="Wrap" Text="接口" VerticalAlignment="Top" Width="46"/>
        			<TextBlock x:Name="tbk_IrState" Height="47" Margin="8,81,8,0" TextWrapping="Wrap" VerticalAlignment="Top" TextAlignment="Center"/>
        		</Grid>
        	</controls:PanoramaItem>
        	<controls:PanoramaItem Header="伺服电机">
        		<Grid>
        			<Button x:Name="bt_setupServo" Content="安装" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,8,8,0" Width="171"/>
        			<TextBox x:Name="tb_ServoPin" Height="71" Margin="54,6,183,0" TextWrapping="Wrap" Text="6" VerticalAlignment="Top"/>
        			<TextBlock HorizontalAlignment="Left" Height="47" Margin="8,27,0,0" TextWrapping="Wrap" Text="接口" VerticalAlignment="Top" Width="46"/>
        			<Button x:Name="bt_ServoSend" Content="发送" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,80,8,0" Width="171"/>
        			<TextBox x:Name="tb_ServoPot" Height="71" Margin="54,78,183,0" TextWrapping="Wrap" Text="180" VerticalAlignment="Top"/>
        			<TextBlock HorizontalAlignment="Left" Height="47" Margin="8,99,0,0" TextWrapping="Wrap" Text="角度" VerticalAlignment="Top" Width="46"/>
        		</Grid>
        	</controls:PanoramaItem>
        	<controls:PanoramaItem Header="无线串口">
        		<Grid>
        			<Button x:Name="bt_串口启用" Content="启用" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,8,8,0" Width="138"/>
        			<TextBox x:Name="tb_比特率" Height="71" Margin="77,6,146,0" TextWrapping="Wrap" Text="19200" VerticalAlignment="Top"/>
        			<TextBlock HorizontalAlignment="Left" Height="47" Margin="8,27,0,0" TextWrapping="Wrap" Text="比特率" VerticalAlignment="Top" Width="65"/>
        			<TextBox x:Name="tb_串口数据" Margin="77,82,8,227" TextWrapping="Wrap" Text="hello WP adk"/>
        			<TextBlock HorizontalAlignment="Left" Height="47" Margin="8,92,0,0" TextWrapping="Wrap" Text="发送数据" VerticalAlignment="Top" Width="65" TextAlignment="Right" FontSize="14.667"/>
        			<Button x:Name="bt_串口发送" Content="发送" VerticalAlignment="Bottom" Margin="0,0,8,2" HorizontalAlignment="Right" Width="105"/>
        			<Button x:Name="bt_串口接收" Content="接收" VerticalAlignment="Bottom" Margin="8,0,0,2" HorizontalAlignment="Left" Width="104"/>
        			<TextBox x:Name="tb_串口接收数据" Margin="77,0,8,126" TextWrapping="Wrap" Height="97" VerticalAlignment="Bottom" IsReadOnly="True"/>
        			<TextBlock HorizontalAlignment="Left" Height="47" Margin="8,0,0,162" TextWrapping="Wrap" Text="接收数据" VerticalAlignment="Bottom" Width="65" TextAlignment="Right" FontSize="14.667"/>
        			<TextBlock x:Name="tbk_串口提示" Height="47" Margin="90,0,21,79" TextWrapping="Wrap" VerticalAlignment="Bottom" FontSize="21.333"/>
        			<Button x:Name="bt_串口取消接收" Content="取消接收" VerticalAlignment="Bottom" Margin="112,0,140,2"/>
        		</Grid>
        	</controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

</phone:PhoneApplicationPage>